package com.yanxibao.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 推文表
 * @TableName yxb_blog
 */
@TableName(value ="yxb_blog")
@Data
public class Blog implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户Id
     */
    private String userId;


    /**
     * 标题
     */
    private String title;

    /**
     * 正文
     */
    private String contents;

    /**
     * 图片路径信息
     */
    private String images;

    /**
     * 浏览量
     */
    private Integer views;

    /**
     * 被赞数
     */
    private Integer likes;

    /**
     * 评论数
     */
    private Integer comments;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime blogTime;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}